package com.tedu.bill.demo1;

/**
 * Author：毕龙
 * Date: 2024/4/21 10:19
 */
public class TestJieOu {
    public static void main(String[] args) {
        Lamp lamp = new Lamp();
        Light l = new WhiteLight();
        easy(l,lamp);
        l = new YellowLight();
        easy(l,lamp);
        l = new GreenLight();
        easy(l,lamp);

    }
    public static void easy(Light light,Lamp lamp){
        lamp.setLight(light);
        lamp.on();
    }


}
